package com.dp.bridge.exp02;

import java.math.BigDecimal;

/**
 * @Author: Ruomeng
 * @Date: 2024/11/29
 * @Description : design-pattern
 * @Version: 1.0
 */
public class AliPay extends Pay {

    public AliPay(IPayMode payMode) {
        super(payMode);
    }

    @Override
    public String transfer(String uid, String tradeId, BigDecimal amount) {
        System.out.println("zfb渠道支付划账开始");
        boolean security = payMode.security(uid);
        System.out.println("zfb渠道支付风险校验" + uid + "," + tradeId + "," + security);
        if (!security) {
            System.out.println("zfb渠道划账失败！");
            return "500";
        }
        System.out.println("zfb渠道划账成功！金额: " + amount);
        return "200";
    }
}
